package com.example.wechat114.controller;

import com.example.wechat114.commons.JsonBean;
import com.example.wechat114.entity.GForm;
import com.example.wechat114.service.GFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("gform")
public class GFormController {

    @Autowired
    private GFormService gFormService;

    @PostMapping("add")
    public JsonBean addGForm(GForm gForm){
        return gFormService.addGForm(gForm);
    }

    @PostMapping("selectOne")
    public JsonBean selectOne(GForm gForm){
        return gFormService.selectOne(gForm);
    }
}
